<?php
$sql="CREATE TABLE IF NOT EXISTS `ims_d1sj_card_bank` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `name` varchar(32) NOT NULL,
  `api` varchar(512) NOT NULL,
  `price` int(10) NOT NULL,
  `icon` varchar(256) DEFAULT NULL,
  `photo` varchar(256) DEFAULT NULL,
  `url` varchar(512) DEFAULT NULL,
  `num` int(10) NOT NULL DEFAULT '0',
  `orderby` int(10) NOT NULL,
  `closed` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_banner` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `url` varchar(100) DEFAULT NULL COMMENT '跳转链接',
  `img` varchar(100) DEFAULT NULL COMMENT 'banner图片',
  `type` int(10) NOT NULL DEFAULT '1' COMMENT '1 新闻 2 网贷 3信用卡',
  `sort` int(10) NOT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_card` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `bank` int(10) NOT NULL,
  `title` varchar(128) NOT NULL,
  `api` varchar(512) NOT NULL,
  `photo` varchar(128) NOT NULL,
  `desc` varchar(512) DEFAULT NULL,
  `detailed` text COMMENT '详细信息',
  `recommend` int(10) NOT NULL DEFAULT '1' COMMENT '1不推荐2推荐',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_cash` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `uid` int(10) NOT NULL,
  `money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1未处理2已打款3已拒绝',
  `alipay` varchar(128) NOT NULL,
  `mobile` varchar(16) DEFAULT NULL,
  `name` varchar(64) NOT NULL,
  `createtime` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_category` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(10) NOT NULL,
  `sort` int(10) NOT NULL COMMENT '排序',
  `name` varchar(24) DEFAULT NULL,
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '1开启0关闭状态',
  `money_max` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '最大金额',
  `money_min` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '小金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_group` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `name` varchar(32) NOT NULL,
  `desc` varchar(1024) NOT NULL,
  `about` text,
  `price` int(10) NOT NULL DEFAULT '0',
  `mout` int(10) NOT NULL DEFAULT '0',
  `mlevel` int(1) NOT NULL DEFAULT '0',
  `weight` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
  `orderby` int(10) NOT NULL,
  `mout_tow` int(10) NOT NULL DEFAULT '0' COMMENT '二级分佣金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_lend` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `title` varchar(64) NOT NULL COMMENT '标题',
  `icon` varchar(256) DEFAULT NULL COMMENT '图标',
  `url` varchar(512) DEFAULT NULL COMMENT '跳转地址',
  `orderby` int(10) NOT NULL DEFAULT '0',
  `status` int(10) NOT NULL DEFAULT '1' COMMENT '1开启2关闭',
  `category_id` varchar(255) NOT NULL COMMENT '所属分类ID',
  `sort` int(10) NOT NULL COMMENT '排序',
  `success_rate` varchar(64) NOT NULL COMMENT '成功率',
  `brief_introduction` varchar(100) NOT NULL COMMENT '简介',
  `daily_interest_rate` varchar(100) NOT NULL COMMENT '日利率',
  `annual_interest_rate` varchar(64) NOT NULL COMMENT '月利率',
  `quota_min` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '额度（最小）',
  `quota_max` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '额度（最大）',
  `month_term_star` varchar(64) NOT NULL COMMENT '期限（月）开始',
  `month_term_end` varchar(64) NOT NULL COMMENT '期限（月）结束',
  `day_term_star` varchar(64) NOT NULL COMMENT '期限（天）开始',
  `day_term_end` varchar(64) NOT NULL COMMENT '期限（天）结束',
  `audit_method` varchar(64) NOT NULL COMMENT '申请方式',
  `audit_cycle` varchar(64) NOT NULL COMMENT '申请周期',
  `lending_time` varchar(64) NOT NULL COMMENT '放款时间',
  `repayment_method` varchar(255) NOT NULL COMMENT '还款方式',
  `application_process` varchar(255) NOT NULL COMMENT '申请流程',
  `application_conditions` varchar(255) NOT NULL COMMENT '申请条件',
  `detailed_introduction` varchar(255) NOT NULL COMMENT '详情介绍',
  `percent_price` varchar(100) NOT NULL COMMENT '百分百分成',
  `recommend` int(10) NOT NULL DEFAULT '1' COMMENT '是否推荐1推荐0不推荐',
  `is_new` int(10) NOT NULL DEFAULT '1' COMMENT '是否推荐1最新0不是最新',
  `application_number` int(10) NOT NULL COMMENT '申请人数',
  `true_click` int(10) NOT NULL COMMENT '真实点击数',
  `price` int(10) NOT NULL DEFAULT '0' COMMENT '分层比例',
  `trait` varchar(64) NOT NULL COMMENT '网贷特点',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_logs` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `level` int(1) NOT NULL DEFAULT '0',
  `record` int(10) NOT NULL DEFAULT '0',
  `uid` int(10) NOT NULL,
  `money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `createtime` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_newclass` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `name` varchar(100) DEFAULT NULL COMMENT '分类名称',
  `img` varchar(100) DEFAULT NULL COMMENT '分类图片',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_news` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `title` varchar(256) NOT NULL,
  `thumb` varchar(256) DEFAULT NULL,
  `desc` varchar(512) DEFAULT NULL,
  `click` int(10) NOT NULL,
  `newclass_id` int(10) NOT NULL,
  `weight` int(10) NOT NULL DEFAULT '0' COMMENT '需要权重',
  `create_time` int(10) NOT NULL,
  `sort` int(10) NOT NULL COMMENT '排序',
  `content` longtext,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_order` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `sn` varchar(24) NOT NULL,
  `uniacid` int(10) NOT NULL,
  `group` int(10) NOT NULL,
  `price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `uid` int(10) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '2未支付1已支付',
  `create_time` int(10) NOT NULL,
  `pay_time` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_record` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(10) NOT NULL,
  `uid` int(10) NOT NULL COMMENT '申请人ID',
  `bank` int(10) NOT NULL COMMENT '银行ID',
  `name` varchar(24) DEFAULT NULL,
  `certify` varchar(24) DEFAULT NULL,
  `mobile` varchar(16) DEFAULT NULL,
  `fan_total` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总佣金',
  `fan_uid1` int(10) NOT NULL DEFAULT '0' COMMENT '上一级领导',
  `fan_level1` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上一级佣金',
  `fan_uid2` int(10) NOT NULL DEFAULT '0' COMMENT '第二级领导',
  `fan_level2` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '第二级佣金',
  `fan_level3` decimal(10,2) NOT NULL DEFAULT '0.00',
  `fan_uid3` int(10) NOT NULL DEFAULT '0',
  `remote` varchar(16) DEFAULT NULL,
  `createtime` int(10) NOT NULL COMMENT '创建时间',
  `application_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '下款额度',
  `status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0未返佣 1审核成功 2 审核失败',
  `type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '1办卡2网贷3是用户会员升级',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_setting` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `config` text,
  `invite` text,
  `raiders` text COMMENT '办卡攻略',
  `contract_noe` text NOT NULL COMMENT '合同一',
  `contract_tow` text NOT NULL COMMENT '合同一',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE IF NOT EXISTS `ims_d1sj_card_user` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(10) NOT NULL,
  `uid` int(10) NOT NULL COMMENT '用户ID',
  `group` int(10) NOT NULL DEFAULT '0' COMMENT '用户级别',
  `name` varchar(32) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(16) DEFAULT NULL COMMENT '手机号码',
  `certify` varchar(24) DEFAULT NULL,
  `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '返佣账户金额',
  `leader1` int(10) NOT NULL COMMENT '上级',
  `leader2` int(10) NOT NULL COMMENT '上上级',
  `leader3` int(10) NOT NULL COMMENT '上上上级',
  `openid` varchar(100) DEFAULT NULL COMMENT '用户openid',
  `alipay` varchar(512) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
";
pdo_run($sql);
if(!pdo_fieldexists('d1sj_card_bank',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `name` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'api')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `api` varchar(512) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'price')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `price` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'icon')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `icon` varchar(256) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'photo')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `photo` varchar(256) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'url')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `url` varchar(512) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'num')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `num` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_bank',  'orderby')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `orderby` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_bank',  'closed')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_bank')." ADD `closed` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_banner',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_banner')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_banner',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_banner')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_banner',  'url')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_banner')." ADD `url` varchar(100) DEFAULT NULL COMMENT '跳转链接';");
}
if(!pdo_fieldexists('d1sj_card_banner',  'img')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_banner')." ADD `img` varchar(100) DEFAULT NULL COMMENT 'banner图片';");
}
if(!pdo_fieldexists('d1sj_card_banner',  'type')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_banner')." ADD `type` int(10) NOT NULL DEFAULT '1' COMMENT '1 新闻 2 网贷 3信用卡';");
}
if(!pdo_fieldexists('d1sj_card_banner',  'sort')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_banner')." ADD `sort` int(10) NOT NULL COMMENT '排序';");
}
if(!pdo_fieldexists('d1sj_card_card',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_card',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_card',  'bank')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `bank` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_card',  'title')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `title` varchar(128) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_card',  'api')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `api` varchar(512) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_card',  'photo')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `photo` varchar(128) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_card',  'desc')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `desc` varchar(512) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_card',  'detailed')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `detailed` text COMMENT '详细信息';");
}
if(!pdo_fieldexists('d1sj_card_card',  'recommend')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_card')." ADD `recommend` int(10) NOT NULL DEFAULT '1' COMMENT '1不推荐2推荐';");
}
if(!pdo_fieldexists('d1sj_card_cash',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_cash',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_cash',  'uid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `uid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_cash',  'money')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists('d1sj_card_cash',  'status')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1未处理2已打款3已拒绝';");
}
if(!pdo_fieldexists('d1sj_card_cash',  'alipay')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `alipay` varchar(128) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_cash',  'mobile')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `mobile` varchar(16) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_cash',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `name` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_cash',  'createtime')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_cash')." ADD `createtime` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_category',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists('d1sj_card_category',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_category',  'sort')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `sort` int(10) NOT NULL COMMENT '排序';");
}
if(!pdo_fieldexists('d1sj_card_category',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `name` varchar(24) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_category',  'status')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `status` int(10) NOT NULL DEFAULT '1' COMMENT '1开启0关闭状态';");
}
if(!pdo_fieldexists('d1sj_card_category',  'money_max')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `money_max` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '最大金额';");
}
if(!pdo_fieldexists('d1sj_card_category',  'money_min')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_category')." ADD `money_min` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '小金额';");
}
if(!pdo_fieldexists('d1sj_card_group',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_group',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_group',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `name` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_group',  'desc')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `desc` varchar(1024) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_group',  'about')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `about` text;");
}
if(!pdo_fieldexists('d1sj_card_group',  'price')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `price` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_group',  'mout')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `mout` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_group',  'mlevel')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `mlevel` int(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_group',  'weight')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `weight` int(10) NOT NULL DEFAULT '0' COMMENT '权重';");
}
if(!pdo_fieldexists('d1sj_card_group',  'orderby')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `orderby` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_group',  'mout_tow')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_group')." ADD `mout_tow` int(10) NOT NULL DEFAULT '0' COMMENT '二级分佣金额';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_lend',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_lend',  'title')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `title` varchar(64) NOT NULL COMMENT '标题';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'icon')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `icon` varchar(256) DEFAULT NULL COMMENT '图标';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'url')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `url` varchar(512) DEFAULT NULL COMMENT '跳转地址';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'orderby')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `orderby` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'status')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `status` int(10) NOT NULL DEFAULT '1' COMMENT '1开启2关闭';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'category_id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `category_id` varchar(255) NOT NULL COMMENT '所属分类ID';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'sort')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `sort` int(10) NOT NULL COMMENT '排序';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'success_rate')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `success_rate` varchar(64) NOT NULL COMMENT '成功率';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'brief_introduction')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `brief_introduction` varchar(100) NOT NULL COMMENT '简介';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'daily_interest_rate')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `daily_interest_rate` varchar(100) NOT NULL COMMENT '日利率';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'annual_interest_rate')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `annual_interest_rate` varchar(64) NOT NULL COMMENT '月利率';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'quota_min')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `quota_min` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '额度（最小）';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'quota_max')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `quota_max` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '额度（最大）';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'month_term_star')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `month_term_star` varchar(64) NOT NULL COMMENT '期限（月）开始';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'month_term_end')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `month_term_end` varchar(64) NOT NULL COMMENT '期限（月）结束';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'day_term_star')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `day_term_star` varchar(64) NOT NULL COMMENT '期限（天）开始';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'day_term_end')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `day_term_end` varchar(64) NOT NULL COMMENT '期限（天）结束';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'audit_method')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `audit_method` varchar(64) NOT NULL COMMENT '申请方式';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'audit_cycle')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `audit_cycle` varchar(64) NOT NULL COMMENT '申请周期';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'lending_time')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `lending_time` varchar(64) NOT NULL COMMENT '放款时间';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'repayment_method')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `repayment_method` varchar(255) NOT NULL COMMENT '还款方式';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'application_process')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `application_process` varchar(255) NOT NULL COMMENT '申请流程';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'application_conditions')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `application_conditions` varchar(255) NOT NULL COMMENT '申请条件';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'detailed_introduction')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `detailed_introduction` varchar(255) NOT NULL COMMENT '详情介绍';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'percent_price')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `percent_price` varchar(100) NOT NULL COMMENT '百分百分成';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'recommend')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `recommend` int(10) NOT NULL DEFAULT '1' COMMENT '是否推荐1推荐0不推荐';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'is_new')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `is_new` int(10) NOT NULL DEFAULT '1' COMMENT '是否推荐1最新0不是最新';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'application_number')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `application_number` int(10) NOT NULL COMMENT '申请人数';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'true_click')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `true_click` int(10) NOT NULL COMMENT '真实点击数';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'price')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `price` int(10) NOT NULL DEFAULT '0' COMMENT '分层比例';");
}
if(!pdo_fieldexists('d1sj_card_lend',  'trait')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_lend')." ADD `trait` varchar(64) NOT NULL COMMENT '网贷特点';");
}
if(!pdo_fieldexists('d1sj_card_logs',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_logs',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_logs',  'type')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_logs',  'level')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `level` int(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_logs',  'record')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `record` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_logs',  'uid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `uid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_logs',  'money')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists('d1sj_card_logs',  'createtime')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_logs')." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_newclass',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_newclass')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_newclass',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_newclass')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_newclass',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_newclass')." ADD `name` varchar(100) DEFAULT NULL COMMENT '分类名称';");
}
if(!pdo_fieldexists('d1sj_card_newclass',  'img')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_newclass')." ADD `img` varchar(100) DEFAULT NULL COMMENT '分类图片';");
}
if(!pdo_fieldexists('d1sj_card_news',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_news',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'title')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `title` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'thumb')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `thumb` varchar(256) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'desc')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `desc` varchar(512) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'click')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `click` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'newclass_id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `newclass_id` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'weight')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `weight` int(10) NOT NULL DEFAULT '0' COMMENT '需要权重';");
}
if(!pdo_fieldexists('d1sj_card_news',  'create_time')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `create_time` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_news',  'sort')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `sort` int(10) NOT NULL COMMENT '排序';");
}
if(!pdo_fieldexists('d1sj_card_news',  'content')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_news')." ADD `content` longtext;");
}
if(!pdo_fieldexists('d1sj_card_order',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_order',  'sn')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `sn` varchar(24) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_order',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_order',  'group')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `group` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_order',  'price')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists('d1sj_card_order',  'uid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `uid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_order',  'status')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '2未支付1已支付';");
}
if(!pdo_fieldexists('d1sj_card_order',  'create_time')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `create_time` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_order',  'pay_time')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_order')." ADD `pay_time` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_record',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists('d1sj_card_record',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_record',  'uid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `uid` int(10) NOT NULL COMMENT '申请人ID';");
}
if(!pdo_fieldexists('d1sj_card_record',  'bank')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `bank` int(10) NOT NULL COMMENT '银行ID';");
}
if(!pdo_fieldexists('d1sj_card_record',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `name` varchar(24) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_record',  'certify')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `certify` varchar(24) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_record',  'mobile')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `mobile` varchar(16) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_total')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_total` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '总佣金';");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_uid1')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_uid1` int(10) NOT NULL DEFAULT '0' COMMENT '上一级领导';");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_level1')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_level1` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上一级佣金';");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_uid2')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_uid2` int(10) NOT NULL DEFAULT '0' COMMENT '第二级领导';");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_level2')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_level2` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '第二级佣金';");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_level3')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_level3` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists('d1sj_card_record',  'fan_uid3')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `fan_uid3` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists('d1sj_card_record',  'remote')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `remote` varchar(16) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_record',  'createtime')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `createtime` int(10) NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists('d1sj_card_record',  'application_amount')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `application_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '下款额度';");
}
if(!pdo_fieldexists('d1sj_card_record',  'status')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0未返佣 1审核成功 2 审核失败';");
}
if(!pdo_fieldexists('d1sj_card_record',  'type')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_record')." ADD `type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '1办卡2网贷3是用户会员升级';");
}
if(!pdo_fieldexists('d1sj_card_setting',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists('d1sj_card_setting',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_setting',  'config')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `config` text;");
}
if(!pdo_fieldexists('d1sj_card_setting',  'invite')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `invite` text;");
}
if(!pdo_fieldexists('d1sj_card_setting',  'raiders')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `raiders` text COMMENT '办卡攻略';");
}
if(!pdo_fieldexists('d1sj_card_setting',  'contract_noe')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `contract_noe` text NOT NULL COMMENT '合同一';");
}
if(!pdo_fieldexists('d1sj_card_setting',  'contract_tow')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_setting')." ADD `contract_tow` text NOT NULL COMMENT '合同一';");
}
if(!pdo_fieldexists('d1sj_card_user',  'id')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists('d1sj_card_user',  'uniacid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists('d1sj_card_user',  'uid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `uid` int(10) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists('d1sj_card_user',  'group')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `group` int(10) NOT NULL DEFAULT '0' COMMENT '用户级别';");
}
if(!pdo_fieldexists('d1sj_card_user',  'name')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `name` varchar(32) DEFAULT NULL COMMENT '真实姓名';");
}
if(!pdo_fieldexists('d1sj_card_user',  'mobile')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `mobile` varchar(16) DEFAULT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists('d1sj_card_user',  'certify')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `certify` varchar(24) DEFAULT NULL;");
}
if(!pdo_fieldexists('d1sj_card_user',  'money')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '返佣账户金额';");
}
if(!pdo_fieldexists('d1sj_card_user',  'leader1')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `leader1` int(10) NOT NULL COMMENT '上级';");
}
if(!pdo_fieldexists('d1sj_card_user',  'leader2')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `leader2` int(10) NOT NULL COMMENT '上上级';");
}
if(!pdo_fieldexists('d1sj_card_user',  'leader3')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `leader3` int(10) NOT NULL COMMENT '上上上级';");
}
if(!pdo_fieldexists('d1sj_card_user',  'openid')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `openid` varchar(100) DEFAULT NULL COMMENT '用户openid';");
}
if(!pdo_fieldexists('d1sj_card_user',  'alipay')) {
	pdo_query("ALTER TABLE ".tablename('d1sj_card_user')." ADD `alipay` varchar(512) DEFAULT NULL;");
}

?>